<div class="content-section introduction">
    <div class="feature-intro">
        <h1>Badge</h1>
        <p>Badge is a small status indicator for another element.</p>
    </div>
</div>

<div class="content-section implementation">
    <div class="card">
        <h5>Numbers</h5>
        <div class="badges">
            <span class="p-badge">2</span>
            <span class="p-badge p-badge-success">8</span>
            <span class="p-badge p-badge-info">4</span>
            <span class="p-badge p-badge-warning">12</span>
            <span class="p-badge p-badge-danger">3</span>
        </div>

        <h5>Tags</h5>
        <div class="badges">
            <span class="p-tag">Primary</span>
            <span class="p-tag p-tag-success">Success</span>
            <span class="p-tag p-tag-info">Info</span>
            <span class="p-tag p-tag-warning">Warning</span>
            <span class="p-tag p-tag-danger">Danger</span>
        </div>

        <h5>Pills</h5>
        <div class="badges">
            <span class="p-tag p-tag-rounded">Primary</span>
            <span class="p-tag p-tag-rounded p-tag-success">Success</span>
            <span class="p-tag p-tag-rounded p-tag-info">Info</span>
            <span class="p-tag p-tag-rounded p-tag-warning">Warning</span>
            <span class="p-tag p-tag-rounded p-tag-danger">Danger</span>
        </div>

        <h5>Positioned Badge</h5>
        <span class="p-overlay-badge p-mr-5">
            <i class="pi pi-bell" style="font-size: 2em"></i>
            <span class="p-badge">2</span>
        </span>

        <span class="p-overlay-badge">
            <p-button label="New"></p-button>
            <span class="p-badge p-badge-warning">5</span>
        </span>

        <h5>Inline Button Badge</h5>
        <p-button label="Emails" badge="8" styleClass="p-mr-2" ></p-button>
        <p-button label="Messages" icon="pi pi-users" styleClass="p-button-warning" badge="8" badgeClass="p-badge-danger" ></p-button>

        <h5>Sizes</h5>
        <div class="badges">
            <span class="p-badge">2</span>
            <span class="p-badge p-badge-lg p-badge-sucess">4</span>
            <span class="p-badge p-badge-xl p-badge-warning">6</span>
        </div>
    </div>
</div>

<div class="content-section documentation">
    <p-tabView>
        <p-tabPanel header="Documentation">
            <h5>Getting Started</h5>
				<p>A badge is offered as pure css rather than a component.</p>

				<h5>Numbers</h5>
				<p>Use <i>.p-badge</i> class to display numbers inside badges.</p>
<app-code lang="markup" ngNonBindable ngPreserveWhitespaces>
&lt;span class="p-badge"&gt;2&lt;/span&gt;
</app-code>

                <h5>Tags</h5>
				<p>Tags are optimized for text rather than number and used with the <i>.p-tag</i> class. For more rounded styling like pills, add the <i>.p-tag-rounded</i> class</p>
<app-code lang="markup" ngNonBindable ngPreserveWhitespaces>
&lt;span class="p-tag"&gt;New&lt;/span&gt;
&lt;span class="p-tag p-tag-rounded"&gt;New&lt;/span&gt;
</app-code>

                <h5>Severities</h5>
                <p>Different options are available as severity levels with.</p>

				<ul>
					<li>.p-badge-secondary</li>
					<li>.p-badge-success</li>
					<li>.p-badge-info</li>
					<li>.p-badge-warning</li>
					<li>.p-badge-danger</li>
				</ul>

                <h5>Positoning</h5>
                <p>A badge can easily be positioned relative to another element when both are wrapped inside an element with <i>p-overlay-badge</i> class.</p>
<app-code lang="markup" ngNonBindable ngPreserveWhitespaces>
&lt;span class="p-overlay-badge"&gt;
    &lt;i class="pi pi-bell" style="font-size: 2em"&gt;&lt;/i&gt;
    &lt;span class="p-badge"&gt;2&lt;/span&gt;
&lt;/span&gt;

&lt;span class="p-overlay-badge"&gt;
    &lt;p-button label="New"&gt;&lt;/p-button&gt;
    &lt;span class="p-badge p-badge-warning"&gt;5&lt;/span&gt;
&lt;/span&gt;
</app-code>

                <h5>Inline Button Badges</h5>
                <p>Buttons provide integrated badge support with the <i>badge</i> and <i>badgeClass</i> properties.</p>

<app-code lang="markup" ngNonBindable ngPreserveWhitespaces>
&lt;p-button label="Emails" badge="8"&gt;&lt;/p-button&gt;
&lt;p-button label="Messages" icon="pi pi-users" styleClass="p-button-warning" badge="8" badgeClass="p-badge-danger"&gt;&lt;/p-button&gt;
</app-code>

                <h5>Sizes</h5>
                <p>Badge sizes are adjusted with additional classes.</p>
<app-code lang="markup" ngNonBindable ngPreserveWhitespaces>
&lt;span class="p-badge"&gt;2&lt;/span&gt;
&lt;span class="p-badge p-badge-l p-badge-sucess"&gt;4&lt;/span&gt;
&lt;span class="p-badge p-badge-xl p-badge-warning"&gt;6&lt;/span&gt;
</app-code>

                <p>In addition, when placed inside another element, badge sizes can also derive their size from their parent.</p>
<app-code lang="markup" ngNonBindable ngPreserveWhitespaces>
&lt;h1&gt;Heading 1 &lt;span class="p-tag p-tag-success"&gt;New&lt;/span&gt;&lt;/h1&gt;
&lt;h2&gt;Heading 2 &lt;span class="p-tag p-tag-success"&gt;New&lt;/span&gt;&lt;/h2&gt;
</app-code>

				<h5>Styling</h5>
				<p>Following is the list of structural style classes, for theming classes visit <a href="#" [routerLink]="['/theming']">theming</a> page.</p>
				<div class="doc-tablewrapper">
                <table class="doc-table">
                    <thead>
                    <tr>
                        <th>Name</th>
                        <th>Element</th>
                    </tr>
                    </thead>
                    <tbody>
                        <tr>
                            <td>p-badge</td>
                            <td>Badge element</td>
                        </tr>
                        <tr>
                            <td>p-tag</td>
                            <td>Tag element</td>
                        </tr>
                        <tr>
                            <td>p-tag-rounded</td>
                            <td>Rounded tag element</td>
                        </tr>
                        <tr>
                            <td>p-overlay-badge</td>
                            <td>Wrapper of a badge and its target.</td>
                        </tr>
                        <tr>
                            <td>p-badge-lg</td>
                            <td>Large badge element</td>
                        </tr>
                        <tr>
                            <td>p-badge-xl</td>
                            <td>Extra large badge element</td>
                        </tr>
                    </tbody>
                </table>
            </div>

            <h5>Dependencies</h5>
            <p>None.</p>
        </p-tabPanel>

        <p-tabPanel header="Source">
            <a href="https://github.com/primefaces/primeng/tree/master/src/app/showcase/components/badge" class="btn-viewsource" target="_blank">
                <span>View on GitHub</span>
            </a>
            
<app-code lang="markup" ngNonBindable ngPreserveWhitespaces>
&lt;h5&gt;Numbers&lt;/h5&gt;
&lt;div class="badges"&gt;
    &lt;span class="p-badge"&gt;2&lt;/span&gt;
    &lt;span class="p-badge p-badge-success"&gt;8&lt;/span&gt;
    &lt;span class="p-badge p-badge-info"&gt;4&lt;/span&gt;
    &lt;span class="p-badge p-badge-warning"&gt;12&lt;/span&gt;
    &lt;span class="p-badge p-badge-danger"&gt;3&lt;/span&gt;
&lt;/div&gt;

&lt;h5&gt;Tags&lt;/h5&gt;
&lt;div class="badges"&gt;
    &lt;span class="p-tag"&gt;Primary&lt;/span&gt;
    &lt;span class="p-tag p-tag-success"&gt;Success&lt;/span&gt;
    &lt;span class="p-tag p-tag-info"&gt;Info&lt;/span&gt;
    &lt;span class="p-tag p-tag-warning"&gt;Warning&lt;/span&gt;
    &lt;span class="p-tag p-tag-danger"&gt;Danger&lt;/span&gt;
&lt;/div&gt;

&lt;h5&gt;Pills&lt;/h5&gt;
&lt;div class="badges"&gt;
    &lt;span class="p-tag p-tag-rounded"&gt;Primary&lt;/span&gt;
    &lt;span class="p-tag p-tag-rounded p-tag-success"&gt;Success&lt;/span&gt;
    &lt;span class="p-tag p-tag-rounded p-tag-info"&gt;Info&lt;/span&gt;
    &lt;span class="p-tag p-tag-rounded p-tag-warning"&gt;Warning&lt;/span&gt;
    &lt;span class="p-tag p-tag-rounded p-tag-danger"&gt;Danger&lt;/span&gt;
&lt;/div&gt;

&lt;h5&gt;Positioned Badge&lt;/h5&gt;
&lt;span class="p-overlay-badge p-mr-5"&gt;
    &lt;i class="pi pi-bell" style="font-size: 2em"&gt;&lt;/i&gt;
    &lt;span class="p-badge"&gt;2&lt;/span&gt;
&lt;/span&gt;

&lt;span class="p-overlay-badge"&gt;
    &lt;p-button label="New"&gt;&lt;/p-button&gt;
    &lt;span class="p-badge p-badge-warning"&gt;5&lt;/span&gt;
&lt;/span&gt;

&lt;h5&gt;Inline Button Badge&lt;/h5&gt;
&lt;p-button label="Emails" badge="8" styleClass="p-mr-2" &gt;&lt;/p-button&gt;
&lt;p-button label="Messages" icon="pi pi-users" styleClass="p-button-warning" badge="8" badgeClass="p-badge-danger" &gt;&lt;/p-button&gt;

&lt;h5&gt;Sizes&lt;/h5&gt;
&lt;div class="badges"&gt;
    &lt;span class="p-badge"&gt;2&lt;/span&gt;
    &lt;span class="p-badge p-badge-lg p-badge-sucess"&gt;4&lt;/span&gt;
    &lt;span class="p-badge p-badge-xl p-badge-warning"&gt;6&lt;/span&gt;
&lt;/div&gt;
</app-code>
        </p-tabPanel>
    </p-tabView>
</div>